package com.katze.tools.hadoop.config;

import org.apache.hadoop.fs.FileStatus;

public enum HdfsFileType implements HdfsFileValue{
    ALL() {
        @Override
        public Boolean value(FileStatus status) {
            return true;
        }
    },

    DOCUMENT () {
        @Override
        public Boolean value(FileStatus status) {
            return status.isFile();
        }
    },

    DIRECTORY() {
        @Override
        public Boolean value(FileStatus status) {
            return status.isDirectory();
        }
    };
}

interface HdfsFileValue {

    Boolean value(FileStatus status);

}